/*
 * ButtonPad.h
 *
 *  Created on: Nov 6, 2011
 *      Author: Ben
 */

#ifndef BUTTONPAD_H_
#define BUTTONPAD_H_

#include <WProgram.h>
#include <Bounce/ObservableBounce.h>

#define BUTTON_DOWN   0x01
#define BUTTON_UP     0x02
#define BUTTON_CENTER 0x04
#define BUTTON_RIGHT  0x08
#define BUTTON_LEFT   0x10

class ButtonPad: public ObservableBounce {
public:
  ButtonPad(uint8_t _ledPin, uint8_t _b1Pin, uint8_t _b2Pin, uint8_t _b3Pin);
  void init();
  //void setLed(int ledValue);
protected:
  int debounce();
private:
  uint8_t getButtonState();
  uint8_t ledPin;
  uint8_t b1Pin;
  uint8_t b2Pin;
  uint8_t b3Pin;

};

#endif /* BUTTONPAD_H_ */
